
package dateDype.instanceOF;

public class nueva extends java.util.Stack{

    public nueva() {
    }
    
    @Override
    public synchronized Object peek() {
        return super.peek();
    }

    @Override
    public synchronized Object pop() {
        return super.pop();
    }

    @Override
    public Object push(Object item) {
        return super.push(item);
    }   
    
    public static void main(String[] args) {
        nueva newaStack = new nueva();
        newaStack.add(2);
        newaStack.add(3);
        newaStack.add(5);
        
        for(Object peek : newaStack) {
            System.out.println(""+peek.toString());
        }
    }
}
